<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <title>快打西游</title>
    <meta name="viewport"
          content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no,target-densitydpi=device-dpi"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="screen-orientation" content="landscape"/>
    <meta name="x5-orientation" content="landscape">
    <meta name="full-screen" content="true"/>
    <meta name="screen-orientation" content="landscape"/>
    <meta name="x5-fullscreen" content="true"/>
    <meta name="360-fullscreen" content="true"/>
    <base href="../"/>

    <style>
        body {
            text-align: center;
            background: #000000;
            padding: 0;
            border: 0;
            margin: 0;
            height: 100%;
        }
        html {
            -ms-touch-action: none; /* Direct all pointer events to JavaScript code. */
            overflow: hidden;
        }
        div, canvas {
            display:block;
            position:absolute;
            margin: 0 auto;
            padding: 0;
            border: 0;
        }

    </style>
    <script>
        function checkRotation(){
            var w = document.documentElement.clientWidth;
            var h = document.documentElement.clientHeight;
            var tipDiv=document.getElementById("tipDiv");
            var gameDiv=document.getElementById("gameDiv");
            if(w<h || window.orientation==180||window.orientation==0){
                //alert("请在系统设置里打开屏幕旋转，并在横屏状态下玩游戏！");
                gameDiv.style.display="none";
                tipDiv.style.display="block";
                tipDiv.style.textAlign="center";
                tipDiv.style.width=w+"px";
                tipDiv.style.height=h+"px";
            }
            if(w>h || window.orientation==90||window.orientation==-90){
                gameDiv.style.display="block";
                tipDiv.style.display="none";
            }
        }
    </script>

</head>
<body onload="checkRotation()">
<div style="position:relative;" id="gameDiv"></div>
<div id="tipDiv" style="color: #ffffff;display:none;text-align:center;">
    <span style="display:block;margin: 50px;font-size: 30px ">请在系统设置里打开屏幕旋转，并在横屏状态下玩游戏！</span><br/>
    <img src="resource/rotateBg.png" >
</div>
<script>var document_class = "Main";</script><!--这部分内容在编译时会被替换，要修改文档类，请到工程目录下的egretProperties.json内编辑。-->
<script src="bin-debug/lib/egret_file_list.js"></script>
<script src="launcher/egret_require.js"></script>
<script src="launcher/egret_loader_rotation.js"></script>
<script src="bin-debug/src/game_file_list.js"></script>

<script>
    var support = [].map && document.createElement("canvas").getContext;
    if (support) {
        egret_h5.preloadScript(egret_file_list, "libs/");
        egret_h5.preloadScript(game_file_list, "bin-debug/src/");
        egret_h5.startLoading();
    }
    else {
        alert("Egret 不支持您当前的浏览器")
    }
</script>
</body>
</html>